package com.ccb.p4.controller;


import com.ccb.p4.common.R;
import com.ccb.p4.entity.Member;
import com.ccb.p4.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author xianghui.zh
 * @since 2022-02-15
 */
@RestController
@RequestMapping("/member")
public class MemberController {

    @Autowired
    private MemberService memberService;

    @GetMapping("{id}")
    public R findById(@PathVariable String id){
        Member member = memberService.getById(id);
        return R.ok().data("item",member);
    }

}

